package com.education.db.domain;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Fan on 2016/9/26.
 */
@Entity
@Table(name = "info_video", schema = "db_education", catalog = "")
public class InfoVideo {
    private int viId;
    private Byte viCourse;
    private String viPath;
    private Byte viStatus;
    private Timestamp viLoadate;

    @Id
    @Column(name = "vi_id")
    public int getViId() {
        return viId;
    }

    public void setViId(int viId) {
        this.viId = viId;
    }

    @Basic
    @Column(name = "vi_course")
    public Byte getViCourse() {
        return viCourse;
    }

    public void setViCourse(Byte viCourse) {
        this.viCourse = viCourse;
    }

    @Basic
    @Column(name = "vi_path")
    public String getViPath() {
        return viPath;
    }

    public void setViPath(String viPath) {
        this.viPath = viPath;
    }

    @Basic
    @Column(name = "vi_status")
    public Byte getViStatus() {
        return viStatus;
    }

    public void setViStatus(Byte viStatus) {
        this.viStatus = viStatus;
    }

    @Basic
    @Column(name = "vi_loadate")
    public Timestamp getViLoadate() {
        return viLoadate;
    }

    public void setViLoadate(Timestamp viLoadate) {
        this.viLoadate = viLoadate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InfoVideo infoVideo = (InfoVideo) o;

        if (viId != infoVideo.viId) return false;
        if (viCourse != null ? !viCourse.equals(infoVideo.viCourse) : infoVideo.viCourse != null) return false;
        if (viPath != null ? !viPath.equals(infoVideo.viPath) : infoVideo.viPath != null) return false;
        if (viStatus != null ? !viStatus.equals(infoVideo.viStatus) : infoVideo.viStatus != null) return false;
        if (viLoadate != null ? !viLoadate.equals(infoVideo.viLoadate) : infoVideo.viLoadate != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = viId;
        result = 31 * result + (viCourse != null ? viCourse.hashCode() : 0);
        result = 31 * result + (viPath != null ? viPath.hashCode() : 0);
        result = 31 * result + (viStatus != null ? viStatus.hashCode() : 0);
        result = 31 * result + (viLoadate != null ? viLoadate.hashCode() : 0);
        return result;
    }
}
